# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-ochre
_pkgname=${pkgname#python-}
pkgver=0.4.0
pkgrel=1
pkgdesc='A tiny Python package for working with colors in a pragmatic way.'
arch=('any')
url='https://github.com/getcuia/ochre/'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-poetry')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('cb565afa02eab8a182038b228aac53a91ddefc97f858f7a38348ae47a10dec1cf3a3d9b05b8ed62270270973fd013fc9a754caff8d2a0810323d7e4c5926fef7')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

